package com.muyu.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.ToString;

/**
 * @ClassName: ApiStatus
 * @Author: Zirun.Xin
 * @Date: 2025/3/20 下午1:53
 * @Version: 1.0
 * @Description: API接口状态码枚举（标准+扩展）
 */
@Getter
@ToString
@AllArgsConstructor
public enum ApiStatusEnum {
    SUCCESS(200, "成功"),
    BAD_REQUEST(400, "Bad Request"),
    UNAUTHORIZED(401, "未登录"),
    INTERNAL_ERROR(500, "服务器内部错误");

    /**
     * 状态码数值
     */
    private final Integer code;

    /**
     * 状态描述信息
     */
    private final String desc;
}
